package com.ly.demo.web;

import com.ly.demo.bean.Options;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;

/**
 * @program: ly-common
 * @description:
 * @author: 作者
 * @create: 2022-08-21 16:33
 */
@RestController("lyDemoIndexDo")
@RequestMapping("demo")
public class IndexDo {

    @RequestMapping("/")
    public ModelAndView index(ModelAndView mav) {
        mav.setViewName("redirect:index.html");
        return mav;
    }

    @Resource
    private Options options;

    @RequestMapping("options")
    Options options() {
        return options;
    }

}
